Generating and searching compressed data

ABSTRACT

Data destined for a client is compressed at a server in a manner that produces a compressed data string that can be searched in its compressed state. The server constructs a code table that assigns codes from a standard code set (e.g., ASCII code set) that are normally unused to selected character pairs in the data string (e.g., the most frequently occurring character pairs). During compression, the selected character pairs are replaced with the corresponding codes. Identifiers are inserted into the compressed data string to separate substrings. To search the compressed data string at the client, a search query is compressed and compared to the compressed substrings. The substring identifiers are used to quickly locate each successive compressed substring. When a match is found, the matching substring is decompressed by replacing the code in the compressed substring with the corresponding character pair in the code table.

RELATED APPLICATIONS

This application is a continuation of and claims priority to U.S. patentapplication Ser. No. 11/082,391 entitled “Generating and SearchingCompressed Data” filed Mar. 17, 2005 to Baldwin et al., the disclosureof which is incorporated by reference herein.

U.S. patent application Ser. No. 11/082,391 claims priority from U.S.patent application Ser. No. 10/062,153, filed Jan. 31, 2002, thedisclosure of which is incorporated by reference herein.

TECHNICAL FIELD

This invention relates to generating and searching compressed data. Moreparticularly, this invention relates to client-server architectures(e.g., television entertainment architectures) in which the servergenerates compressed data (e.g., program data for an electronic programguide) that can be readily searched at the client (e.g., a low resourceset-top box) in the compressed state.

BACKGROUND

Electronic program guides (EPGs) enable TV viewers to navigate throughan onscreen program guide and locate shows. With the guides, viewers canlook at schedules of current and future programming, set reminders forupcoming programs, or enter instructions to record one or more shows.

Program data for an EPG is stored in the client memory. The amount ofEPG data available for the EPG is dependent upon the resourceenvironment at the client. In a low-resource environment, meaning theclient has limited memory and/or processing resources, the amount ofmemory reserved for program data and the ability to perform operationson the data, such as searching, are limited.

Accordingly, for such low-resource environments, there is a need fortechniques to compress the EPG data for more efficient storage at theclient, yet in a manner that allows effective searching with limitedprocessing capabilities.

SUMMARY

Data destined for a client is compressed at a server in a manner thatproduces a compressed data string that can be searched in its compressedstate. The server constructs a code table that assigns codes from astandard code set (e.g., ASCII code set) that are normally unused toselected character pairs in the data string (e.g., the most frequentlyoccurring character pairs). During compression, the selected characterpairs are replaced with the corresponding codes. Identifiers areinserted into the compressed data string to separate substrings.

The compressed data string and code table are delivered to the client.To search the compressed data string, a search query is first compressedand then compared to the compressed substrings. The substringidentifiers are used to quickly locate each successive compressedsubstring. When a match is found, the matching substring is decompressedby replacing the code in the compressed substring with the correspondingcharacter pair in the code table.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a television entertainment system including apublisher to generate program data, a data center to process the programdata, and one or more head ends to distribute the program data tomultiple clients.

FIG. 2 is a block diagram of a server computer resident at the datacenter to process the program data.

FIG. 3 is a block diagram of an exemplary client implemented as a settop box.

FIG. 4 illustrates memory space available for storing program data. Thememory space is disproportionately allocated among multiple time unitssuch that different amounts of program data are placed in thedifferent-size sections of memory.

FIG. 5 is a flow diagram of the data selection process used to determinewhich items of program data are placed in the allocated memory forvarious time units.

FIG. 6 illustrates tables used to organize program data.

FIG. 7 illustrates an exemplary sorting process in which the programdata is sorted prior to delivery to the clients.

FIG. 8 illustrates an exemplary fragmentation process in which theprogram data file fragmented prior to delivery to the clients.

FIG. 9 is a flow diagram of a process for generating and searchingcompressed data.

FIG. 10 illustrates exemplary table construction operations of the FIG.9 process in which a counts table and a code table are constructed andfilled.

FIG. 11 illustrates an exemplary counts table used to hold counts of thenumber of occurrences of character pairs in an input data string beingcompressed.

FIG. 12 illustrates an exemplary code table used to assign codes forcorresponding character pairs found to occur most often in the inputdata string.

FIG. 13 illustrates exemplary compression operations of the FIG. 9process in which the input data string is compressed using the codetable.

FIG. 14 illustrates an exemplary searching operation of the FIG. 9process in which a client searches the compressed data string in itscompressed state.

FIG. 15 illustrates an exemplary decompression operation of the FIG. 9process in which the client decompresses the compressed data string.

DETAILED DESCRIPTION

The following discussion is directed to television entertainmentsystems, such as interactive TV networks, cable networks that utilizeelectronic program guides, and Web-enabled TV networks. Clients in suchsystems range from full-resource clients with substantial memory andprocessing resources (e.g., TV-enabled personal computers, TV recordersequipped with hard-disks) to low-resource clients with limited memoryand/or processing resources (e.g., traditional set-top boxes). Whileaspects of the systems and methods described below can be used in any ofthese systems and for any types of clients, they are well suited forsystems with low-resource clients. Hence, the following discussiondescribes the systems and methods in the context of a low-resourceenvironment.

Television Entertainment System

FIG. 1 shows a television entertainment system 100 that facilitatesdistribution of program data from a publisher to the viewers. System 100includes a publisher 102 that creates the program data. One example of apublisher 102 is the Tribune Corporation, which generates data forinteractive television networks. As used herein, program data refers tothe type of data that might be used by an electronic program guide (EPG)and/or to facilitate interactive television functionality. Program dataincludes program titles, ratings, characters, description, actor names,year made, station call letters, time schedules, channel numbers, and soon. The terms “program data” and “EPG data” are used interchangeablythroughout this disclosure.

The EPG data is transferred as an electronic file 104 from the publisher102 to a data center 106. As one example, the program data 104 istransferred using a file transfer protocol (FTP) over a TCP/IP network(e.g., Internet, UNIX, etc.) to the data center 106. The electronic file106 is stored in an EPG database 108 at the data center 106.

The original version of the EPG data contains all of the programminginformation for multiple days. An EPG server 110 resides at the datacenter 106 to process the EPG data prior to distribution. The processinginvolves one or more techniques to condition the EPG data so that a lowresource client can handle the data more effectively. Low resourceclients, such as a set top box, are typically characterized as havinglimited memory and/or processing resources. Such clients may not be ableto store the entire original version of the EPG data. With limitedresources at the client, the processes performed by the EPG server 110are helpful to precondition the EPG data into a more suitable form forstorage and processing at the client.

Among other processes, the EPG server 110 is configured to reduce theamount of EPG data so that it can be stored at low-resource clients. TheEPG server 110 might also alter the format or structure of EPG data 104to enable easier searching or other processes at the clients. The EPGserver 110 might also compress the EPG data prior to its distribution.

The EPG server 110 creates different versions of the program data fordifferent head end services to account for programming preferences andlineups. For example, the EPG server 110 limits the EPG data to thosechannels that are relevant to the respective head ends. In theillustrated example, the EPG server 110 creates multiple versions of theEPG data, which are designated as EPG₁, EPG₂, . . . , EPG_(h), andstores them in respective databases 112(1), 112(2), . . . , 112(h). Thedata center 106 transfers the head end versions of the EPG data aselectronic files 114 to associated head end services 120(1), 120(2), . .. , 120(h) using, for example, FTP or other suitable transfer protocolsover a network.

At individual head end services, as represented by service 120(1), theEPG data is stored in a head end database 122. A carousel file system124 repeatedly broadcasts the EPG file 126 over an out-of-band (OOB)channel to the clients 130(1), 130(2), . . . , 130(c). The distributedEPG file 126 may or may not be identical to the file 114 received fromthe data center 106. Distribution from the head ends 120 to the clients130 may be accommodated in a number of ways, including cable, RF,microwave, network (e.g., Internet), and satellite.

In the illustrated implementation, the clients 130 are embodied as settop boxes (STBs) connected to associated televisions 132(1), 130(2), . .. , 132(c). The clients 130 are often equipped with sufficientprocessing and storage capabilities to store and run an operating systemand a few programs. Examples of programs stored on a client mightinclude a Web browser, an electronic programming guide, a personalscheduler, and so forth. Although the STBs are shown separately from thetelevision sets, they may alternatively be built into the televisionsets as integral units. Furthermore, in other implementations, theclients may be embodied as other devices capable of handling EPG data,such as a broadcast-enabled computer, an information appliance, or thelike.

Exemplary EPG Server

FIG. 2 shows an exemplary implementation of the EPG server 110. It has aprocessing unit 202 and memory 204. Memory 204 includes volatile memory206 (e.g., RAM) and non-volatile memory 208 (e.g., ROM, flash, floppydisk, hard disk, CD-ROM, disk array, etc.). The server 110 may befurther equipped with a database I/O 210 to interface with the EPGdatabase 108 and/or version databases 112(1)-112(h) and a network I/O212 to provide access to one or more networks. The server 110 mayoptionally be equipped with one or more input devices 214 (e.g.,keyboard, mouse, track ball, touch panel screen, etc.) and one or moreoutput devices 216 (e.g., display, printer, etc.).

One or more programs are stored in memory 204 and executed on processingunit 202 to process the EPG data. The programs include a data structurefragmenter 220, a program table constructor 222, a time-based dataselector 224, and a data compressor 226. The EPG server 110 also runs anoperating system (not shown), such as a Windows® brand operating systemfrom Microsoft Corporation, or a Unix-based operating system.

The various processes performed by the EPG server 110 are intended toplace the EPG data in better condition for handling by the low resourceclient. The data structure fragmenter 220 pre-formats the data at theserver for use by the client. The client 130 has previously designatedan arbitrary data set size for a particular application, such as an EPGapplication, and allocates a block of memory in segments of that size.The arbitrary size is communicated to the EPG server 110, and the datastructure fragmenter 220 “fragments” the data in advance of delivery tothe client 130. The client-designated arbitrary data size is thusguaranteed by the server 110 to be the size of data transmitted to theclient. Therefore, when the client 130 receives the data, the client canallocate the data packets to the pre-allocated segments in memorywithout making system calls to the memory. One exemplary fragmentationprocess is described below in more detail with reference to FIG. 8.

The data sorter 222 pre-sorts EPG data to improve searching at theclient. The EPG data is pre-sorted according to a type of field, such asa title. The data sorter 222 constructs a table with the pre-sorted dataand this table is used by the client to facilitate fast searches, eventhough the client has limited processing resources. One exemplarysorting process is described below in more detail with reference toFIGS. 6 and 7.

The time-based data selector 224 selects which program data to beincluded in the file to be downloaded to the client. Low resourceclients may not be able to store and display program scheduleinformation for multiple days because of limited memory. The time-basedselector 224 selectively stores more data for a current time periodrepresented by the EPG (e.g., the current day) and progressively lessdata over time for subsequent time units (e.g., next several days). Thisenables a rich display of information for the time period in whichviewers are most likely interested, while offering some additionalsubset of data for future programming. One exemplary selection processis described below in more detail with reference to FIGS. 4 and 5.

The data compressor 226 can be used to compress data destined for theclient to a compressed format that remains easily searchable at theclient. In one implementation, the data compressor 226 makes an initialpass through the data and constructs a table identifying the mostfrequently used character sequences. The data compressor constructs acode table that assigns codes from a standard code set (e.g., ASCII codeset) that are normally unused to selected character pairs in the data(e.g., the most frequently occurring character pairs). During one ormore subsequent passes, the data compressor 226 compresses the datastring by substituting a previously unused code value for the selectedcharacter pairs. The compressed data file and code table can then bedownloaded to the client for decompression. One exemplary process forgenerating searchable compressed data is described below in more detailwith reference to FIGS. 9-15.

It is noted that the processes carried out by the EPG server aredescribed as being implemented in software. However, in alternativeimplementations, some or all of these processes may be implemented infirmware and/or hardware.

Exemplary Client

FIG. 3 shows an exemplary client 130 implemented as a set-top box. Theclient 130 has a central processing unit (CPU) 302 coupled to a decoderASIC (application specific integrated circuit) 304. In addition todecoder circuitry, ASIC 304 may also contain logic circuitry, bussingcircuitry, and a video controller. The client 130 further includes anout-of-band (OOB) tuner 306 to tune to the broadcast channel over whichthe EPG data file 126 is downloaded. One or more in-band tuner 308 isalso provided to tune to various television signals. These signals arepassed through the ASIC 304 for audio and video decoding and then to anoutput to the television set. With the tuners and ASIC 304, the clientis equipped with hardware and/or software to receive and decode abroadcast video signal, such as an NTSC, PAL, SECAM or other TV systemvideo signal and provide video data to the television set.

One or more memories are coupled to ASIC 304 to store software and dataused to operate the client. In the illustrated implementation, theclient has random access memory (RAM) 310, read only memory (ROM) 312,and flash memory 314. RAM 310 stores data used by the client, includingthe EPG data file 126 as well as any compression table used todecompress the file. ROM 312 stores an operating system (not shown).

One or more programs may be stored in the ROM 312 or in the flash memory314. In the illustrated example, the flash memory 314 stores adecompression program 320 that can be executed to decompress the EPGdata file 126. An EPG program 322 is also stored in the flash memory 314to operate on the EPG data 126. The EPG program 322 may include a searchengine 324 to search the EPG data (in a compressed or uncompressedstate) in response to queries submitted by the viewer. The search enginemight be used, for example, to locate particular television shows bytitle, or find shows with a particular rating, or identify programs withselected actors.

The client 130 may further include other components, which are not shownfor simplicity purposes. For instance, the client is typically equippedwith hardware and/or software to present a graphical user interface to aviewer, by which the viewer can navigate the EPG, or (if enabled) toaccess various Internet system network services, browse the Web, or sendemail. Other possible components might include a network connection(e.g., modem, ISDN modem, etc.) to provide connection to a network, anIR interface, display, power resources, etc. A remote control mayfurther be provided to allow the user to control the client.

Time-Based EPG Data Selection

Low resource client 130 has limited memory resources. For example, settop boxes are typically manufactured with a fixed amount of memory thatsatisfies the manufacturer's price/performance criteria. A portion ofthis memory is allocated to hold EPG data. The amount of EPG data to betransmitted down to the set top box might be expected to consume, forexample, no more than 500K bytes of memory.

Accordingly, one process performed on the EPG data prior to delivery tothe client concerns selecting which items of the EPG data to send to theclient. Items believed to be of greater importance to the viewer areselected for transmission, whereas items deemed to be of less importanceare not. In the example illustrated in FIG. 1, the data selectionprocess is performed by the EPG server 110 of the data center 106, andparticularly by the time-based data selector 224. The EPG server 110examines the publisher-created EPG data 104 stored in the EPG database108 and selectively resolves that original EPG data into a smaller dataset. It is noted that the EPG data selection process may be performed atother computing sites in system 100; including at the head end services120.

One factor in determining what constitutes suitable items of the EPGdata is time. With limited memory at the client, the selection processattempts to ensure that at least the timeliest EPG data is downloaded tothe client. EPG data for future programs can be added to the downloadedfile if there is available memory. In one implementation, timeincrements used in the selection process correspond to 24-hour days.Thus, the selection process chooses more EPG data for the current dayand progressively less EPG data over time for subsequent days. Thisenables the richest display of information for the day in which viewersare most likely look at program schedules, but still provides somesubset of data for future programming.

FIG. 4 illustrates one exemplary implementation of the selection process400. The process utilizes a memory 402 that represents the client memorythat will be used to store the EPG data. The size of memory 402 thuscorresponds to the size of the client memory. Memory 402 isdisproportionately allocated among multiple time units represented inthe EPG. Different-size sets of EPG data are then selected to fill theallocated memory portions.

The time units can be over any predetermined interval, with one suitablesize being a 24-hour day. Accordingly, in this example, the memory space402 is allocated as five sections 404(1)-404(5) for a five-day periodfrom a current day (e.g., Monday) to five days in the future (e.g.,Friday). The amount of memory allocated for each day is dependent uponhow close in time the day is to the current day. This is illustrated bythe largest allocated section 404(1) corresponding to the current day(e.g., Monday) and the smallest allocated section 404(5) correspondingto the furthest day away from the current day (e.g., Friday).

At the EPG server 110, the data selector 224 chooses items of the EPGdata to be placed in each memory section 404 according to how much spaceis allocated for that time unit. Since the current day has the mostallocated space, more EPG data pertaining to current-day programming isselected for inclusion in the EPG file to be sent to the client. For thefurthest day away (e.g., Friday), less EPG data for Friday is selectedfor inclusion in the EPG file.

For discussion purposes, a sample of EPG data 406 is listed in FIG. 4.Among other items, the EPG data for a program typically includes aprogram title, a description, an episode title, an MPAA rating, acategory, a TV rating, a year that the show was made, and a star rating.Some data may be represented in multiple ways to accommodate spaceconcerns. For instance, title data might consist of three versions: afull title with 40 or less characters, a mid-length title with 20 orless characters, and a short title with 10 or less characters.Similarly, there might be three versions of the description.

Different collections of the EPG data 406 are placed in the variousmemory sections 404(1)-(5) depending upon available space allocated forthat day. To illustrate this point, suppose that the data selector 224places the following collection of EPG data in the memory section 404(1)associated with Monday:

-   -   40 character title    -   60 character description    -   episode title    -   MPAA rating    -   category    -   TV rating    -   Year    -   Star Rating

Then, for the smaller memory section 404(5) associated with Friday, thedata selector 224 might select only the following collection of EPGdata:

-   -   10 character title    -   MPAA rating    -   category    -   TV rating

The EPG data included in Friday's memory section 404(5) is sufficientfor the viewer to browse the future programming and to set variousconditions, such as reminders or recording events.

FIG. 5 shows one example of a selection process 500 performed by thetime-based data selection program 224 executing at the EPG server 110.Generally, the process 500 can be thought of as two passes over thetime-divided memory structure to dynamically store as much EPG data ineach of the memory sections. The first pass begins at the day furthestin the future and works backwards toward the present day. The secondpass starts with the current day and works forward into the future. Inboth passes, unused space from one day is shifted to the next day. Theprocess 500 may be implemented in software, firmware, hardware, or acombination of these. The process is illustrated as a set of operationsthat may be implemented as computer-executable instructions that can beexecuted by a computer, such as EPG server 110.

At block 502, the process allocates disproportionate amounts of thememory 402 (FIG. 4) among the time units. For discussion purposes,suppose the total amount of memory available for EPG data is 500K bytesand the process allocates this memory over five 24-hours time slots asrepresented in FIG. 4. As an initial allocation, suppose the section404(1) for Monday is allocated 120K bytes, the section 404(2) forTuesday is allocated 10K bytes, the section 404(3) for Wednesday isallocated 100K bytes, the section 404(4) for Thursday is allocated 90Kbytes, and the section 404(5) for Friday is allocated 80K bytes.

At block 504, the first or future-to-present pass is initiated, startingwith the section corresponding to the furthest time in the future forwhich there is EPG data. Here, there are five days of program listingsand the fifth or furthest day out from Monday is Friday. At block 506,the process determines whether all of the EPG data for Friday will fitin the allocated space 404(5) (e.g., 80K bytes). If there is more EPGdata than available space (i.e., the “No” branch from block 506), theprocess removes one or more items of EPG data (block 508) andreevaluates whether the reduced data set fits in the allocated space.This loop is repeated until a set of EPG data that fits the space isfound.

The removal of EPG data may be handled in a number of ways. Forinstance, the EPG data may be prioritized in some manner thatestablishes the order in which items are removed. For the EPG data shownin FIG. 4, one possible order might be as follows:

-   -   1. eliminate Star Rating    -   2. eliminate Year    -   3. eliminate 60 character description    -   4. eliminate 40 character title    -   5. eliminate 40 character description    -   6. eliminate 20 character title    -   7. eliminate 20 character description    -   8. eliminate 10 character title    -   9. eliminate episode title    -   10. eliminate MPAA rating    -   11. eliminate Category    -   12. eliminate TV Rating

Another possible approach is to assign level-of-detail values thatcorrespond to diminishing sets of EPG data. For instance, a first valuemight represent the fewest number of acceptable items in the EPG datafor a give time unit; another value might represent the next biggest setof EPG data; and so one. With this approach, the operation of block 508is to find the appropriate level-of-detail value for the availablememory space.

Once the appropriate amount of EPG data is found to fit the allocatedspace for Friday (i.e., the “yes” branch from block 506), the EPG data(or corresponding level-of-detail value) is temporarily stored memory(block 510). At block 512, the process determines whether all allocatedtime units in the first pass have been considered. In this case, onlyFriday has been evaluated. Thus, at block 514, the process continues tothe next time unit, which is Thursday in our example. Additionally, theprocess may optionally add any available space into the allocation forthe next day to be considered. For instance, suppose that the firstiteration found that 78K bytes of EPG data fit the allocated 80K bytes.The additional 2K bytes would then be shifted to the memory section404(4) for Thursday to enlarge that allocation to 92K bytes of memory.

The first pass through the available memory continues for each day, fromFriday back to Monday. With each iteration, any additional memory spaceis moved to the next day to accept potentially more EPG data for thatday.

Once the EPG data set for the current time unit (i.e., Monday) is foundand recorded at block 510, the process begins the second pass at block516. This present-to-future pass begins with the next closest time unit(i.e., Tuesday). Any leftover space that was not used to hold the EPGdata for Monday is added back to the available space for Tuesday to seeif any additional data can now be fit into Tuesday's allocated space(block 518).

At block 520, the process determines whether any more EPG data forTuesday will fit in the allocated space. With the additional space movedover from Monday, there may be just enough space to add one or more EPGdata items or modify the level-of-detail value. If more EPG data can beadded, the process enlarges the EPG data for that day (block 522) andreevaluates with the enlarged data set whether even more data may beincluded. This loop is repeated until a set of EPG data that fits thespace is found.

Once the appropriate amount of EPG data is found to fit the allocatedspace for Tuesday (i.e., the “no” branch from block 520), the data itemsand/or corresponding level-of-detail value associated with this day isupdated to reflect the additional subject matter (block 524). At block526, the process determines whether all allocated time units in thesecond pass have been considered. If not, the next iteration isperformed for the next time unit (e.g., Wednesday) and any availablespace is moved into the allocation for that time unit. The second passthrough the available memory continues for each day, from Tuesday backto Friday.

When all time units are considered (i.e., the “yes” branch from block526), the EPG data file is constructed (block 528). The resulting fileincludes varying amounts of data with more EPG data being contained inthe current day and progressively less EPG data for subsequent days. Thespace used to store the various days of EPG data will most likely bedifferent from the initially allocated amounts as a result of thetwo-pass process. As an example, the final distribution of availablememory space might be 123K for Monday's EPG data, 109K for Tuesday's EPGdata, 104K for Wednesday's EPG data, 88K for Thursday's EPG data, and76K for Friday's EPG data. In any event, the EPG data is guaranteed tofit within the pre-allocated space at the client (e.g., the 500K bytesof memory). Table Arrangement of Sorted EPG Data

Low resource client 130 has limited memory resources (e.g., 500K bytes)and limited processing resources to perform operations on the data, suchas searching. Accordingly, one process performed on the EPG data priorto delivery to the client concerns structuring the EPG data in a waythat facilitates searching at the client. The EPG data is pre-sorted atthe EPG server 110 according to data type, such as by titles ofprograms. In one example, the EPG server 110 can be used to pre-sortthose items of EPG data selected as a result of the time-based selectionprocess described above with respect to FIGS. 4 and 5.

The pre-sorted EPG data is arranged in tables that are delivered andstored at the client. The pre-sorted tables are conducive to fastsearches at the client, even though the client has limited processingcapabilities. It is noted that the sorting process may be performed atother computing sites in system 100, including at the head end services120.

FIG. 6 shows exemplary EPG data 600 to be delivered to the client. TheEPG data 600 is stored in multiple tables, where individual tables areemployed to store similar data of a particular type. In the illustratedexample, there are one or more program tables 602(1), 602(2), 602(3), .. . , 602(p) containing program listings, one or more schedule tables604(1), . . . , 604(s) containing schedule-related data, a station table606 containing station information, and a channel table 608 containingreal/virtual channel and frequency information.

The tables store the program data in records. For example, the programtables 602 consist of records pertaining to programming information, asrepresented by program record 620. Each program record 620 has one ormore fields, such as a program identifier field 622, a program titlefield 624, a program description field 626, and so on. The scheduletable 604 has records pertaining to scheduling information, asrepresented by program record 628. Each schedule record 628 has one ormore fields, such as a time field 630 and a program identifier field632. The station table 606 has records pertaining to stationinformation, as represented by station record 640. These station records640 may include one or more fields used to identify a station, such asits call letters, a corporate entity description, and so on. The channeltable 608 stores records pertaining to channel information, asrepresented by channel record 650. The channel records 650 may includeone or more fields used to identify a channel, such as a channelidentifier, a channel frequency, and so on.

The tables are related so that records in one table can cross-index intorelated information in one or more other tables. For instance, thechannel record 650 in channel table 608 may index to a station record640 in the station table to identify the call letters for the channelidentifier. That station record 640 may then index into the scheduletable 604 to identify multiple records 628 defining the schedule forthat station. The schedule records 628 may further reference individualprogram records 620 in the program tables 602. The program records 620hold the details of the programs corresponding to the time slotsidentified in the schedule table 604 for the particular station orchannel.

The tabular data structure 600 represents the native form of the EPGdata that can be delivered, via broadcast or other means, to theclients. The EPG data can be indexed by channel to allow individualnetworks to obtain the appropriate EPG data for their clients. The EPGprogram at the client understands the native form and can process thedata to perform various operations. In its unsorted state, however, theEPG data is not conducive to fast searches on the low resource client.The client is faced with either sorting the existing EPG data on itsown, which is resource expensive, or performing lengthy searches onunsorted data, which is slow.

FIG. 7 illustrates one exemplary implementation of the sorting process700 for sorting the EPG data 600. The process is described withreference to a diagrammatic illustration depicting exemplary componentsof the television entertainment system 100 that might be used to performthe enumerated operations.

At 702, the program data is stored in native form in multiple tables.This is represented by the tabular data structure 600 shown in FIG. 4,and diagrammatically illustrated in FIG. 5. The program listings arethus originally stored in program tables 602 in the order produced bythe EPG data publisher 102.

At 704, the data sorter 222 at the EPG server 110 sorts the program datain the tables by a specific parameter type that a viewer is anticipatedto want to search. For example, in one implementation, the data sorter222 arranges EPG data in the program tables alphabetically according tothe “stopped name” of the program. The “stopped name” of a program isthe shortened version of the program title that contains the identifyingwords, without common joiner words such as “the”, “and”, etc. Forexample, the movie “The Good, The Bad, and The Ugly” might have astopped name of “Good, Bad, Ugly” and the program “How the West was Won”might have a stopped name of “West Won”.

An example set of program records 620 for different programs is shown inFIG. 7. Notice that the program record for the movie “The Good, The Bad,and The Ugly” is ordered alphabetically under “G” rather than under “T”.Similarly, the movie “The Matrix” is arranged under “M” and the program“How the West was Won” is sorted under “W”. The data may be sorted usingother data types as well. For example, the data sorter 222 may arrangethe EPG data according to actor names, or program genre, or ratings.

If there is EPG data for multiple days, the data sorter 222 sorts theprogram records for each day independently of the other. This willproduce multiple sets of sorted program data for corresponding multipledays. Alternatively, all of the records for all of the days can besorted together. It is also noted that other servers besides the EPGserver 110 may be employed to perform the sorting techniques asdescribed herein, such as servers at head end services 120.

At 706, the EPG server 110 constructs a data file 750 for delivery tothe client. The data file 750 holds the tables, including the sortedprogram tables. If there is EPG data for multiple days, one datastructure is constructed for each day. The one or more data structures750 may then be broken into multiple chunks that may or may not be thesame size. Each chunk is atomic, containing a range of records and anindex to describe where the records in the table(s) fit within thecontext of the whole EPG data file. Each chunk may hold parts of onetable or up to multiple tables. Individual tables know in which chunkthey reside. Table boundaries are therefore different than chunkboundaries, although they may coincide.

At 708, the data file 750 is delivered to the client 130 via the headend service. When the client 130 receives the data file, it stores thedata file in RAM 310.

At 710, the client performs a search over the data structure stored inRAM. Due to the pre-sorted arrangement of the records, the client isable to perform a simple and fast binary search on the data. Forinstance, suppose viewer is interested in locating the movie, “TheMatrix”. The client's search engine 324 performs a binary search throughthe title fields of the program records, comparing two titles at a time.Here, the movie “The Matrix” is ordered after “Mary Poppins” and before“Miracle on 34^(th) Street” as represented by title listing 752.

Where data structures for multiple days exist, the search engine 324performs a two-phase searching process. A first phase involves a binarysearch of the program data for each day to produce intermediate results.Suppose, for example, that the program data covers five days, Mondaythrough Friday. The first phase produces search results for each data,Monday through Friday. A second phase combines the daily resultsproduced from the first phase and sorts them. The final results are thenreturned.

Fragmentation of Program Data

Another process that may be performed on the EPG data prior to deliveryto the client concerns formatting the EPG data into multiple blocks of apredetermined size. The client 130 designates an arbitrary data size andallocates a portion of its memory in segments of that size. Thearbitrary size is communicated to the EPG server 110. The data structurefragmenter 220 “fragments” the publisher-created EPG data 104 stored inthe EPG database 108, or a subset of that data, in advance of deliveryto the client 130.

When finally delivered, the fragmented data fits neatly into thepre-allocated segments of the client memory. As a result, system callsto the memory for purposes of accessing EPG data are greatly reduced oreliminated, resulting in less fragmentation of memory and more efficientstorage of the EPG data. It is noted that the fragmentation process maybe performed at other computing sites in system 100, including at thehead end services 120.

FIG. 8 illustrates one exemplary implementation of the fragmentationprocess 800. The process is described with reference to a diagrammaticillustration depicting exemplary components of the televisionentertainment system 100 that might be used to perform the enumeratedoperations.

At 802, the client 130 designates an arbitrary data size and allocates aportion of its memory 310 into segments 820 of that size. As oneexample, the memory segments 820 are equal size segments of 16K bytes.This memory allocation size might alternatively be specified by themanufacturer.

At 804, the client 130 communicates the size of the memory segments 820to an upstream server, such as EPG server 110. Alternatively, thesegment size of the client memory may be a parameter that is alreadyknown to the EPG server 110. For instance, the clients may be configuredduring manufacturing to allocate the memory designated for holding EPGdata in certain size segments. This parameter could then be provided tothe EPG server 110 as the target size for the data fragments. It is alsonoted that other servers besides the EPG server 110 may be employed toperform the fragmentation techniques as described herein, such asservers at head end services 120.

At 806, the EPG server 110 begins producing the EPG data file fordelivery to the client. The EPG server 110 may structure and format thedata file in many ways. One approach is to construct multiple tablesthat hold various types of EPG data, such as the table structure 600 ofFIG. 6. Each table is self-contained in that it knows its type andcontents. The tables are arranged in a data structure, which isrepresented as structure 822 in FIG. 8.

The table data structure 822 is broken into multiple chunks 824 that mayor may not be the same size. Each chunk 824 is atomic, containing arange of records and an index to describe where the records in thetable(s) fit within the context of the whole EPG data file. Each chunk824 may hold parts of one table or up to multiple tables. Individualtables know in which chunk they reside. Table boundaries are thereforedifferent than chunk boundaries, although they may coincide.

At 808, the data structure fragmenter 220 fragments the table structure822 into smaller size fragments 830. Each structure fragment 830 iscapable of fitting in a corresponding memory segment 820. Moreparticularly, in our example, the EPG data fragments 830 are of a sizethat is guaranteed to be less than or equal to the arbitrary sizedesignated by the client 130, or less than or equal to 16K bytes. Noticethat the fragment boundaries may or may not coincide with the chunkboundaries and/or table boundaries.

At 810, the fragmented data file 114 can be delivered to the client 130via the head end service. When the client 130 receives the fragmenteddata, the client stores the data fragments 830 in respectivepre-allocated segments 820 without making system calls to the memory.When the client subsequently makes a call to free memory, the memory isprovided in the fixed-size segments. In this way, fragmentation isconstrained to the fixed-size spaces that can be more easily managed,thereby eliminating the need for memory management techniques such asde-fragmentation or garbage collection processes.

It is noted that the fragmentation process may be performed on eithernon-compressed or compressed data. If performed on compressed data, thefragmentation process is executed following the compression processdescribed in the next section.

Generating Searchable Compressed Data

Due to the limited memory at the low resource client, another processthat can be performed on the EPG data prior to delivery is to compressthe EPG data in a manner that facilitates searching of the data in itscompressed state. The following discussion provides one exemplaryapproach to generating and searching compressed data. The techniquesdescribed below can be performed on essentially any string of bits, andis particularly well suited for alphanumeric text strings. Forcontinuity purposes and ease of understanding, the techniques aredescribed in the context of compressing the EPG data at the EPG serverand then searching the compressed EPG data at the client. The generalprocess is described first, followed by a more detailed explanation ofone exemplary implementation that utilizes the ASCII standard.

FIG. 9 shows an exemplary process 900 for generating and searchingcompressed data. Generally, the process 900 includes a server-basedphase and a client-based phase. In this server-based phase, data (e.g.,EPG data) is compressed into a format that is readily searchable by theclient, including low-resource clients. This first phase can beperformed by the data compressor 226 executing at the EPG server 110, orby other computing sites in system 100, such as at the head end services120. The client-based phase is performed at the client. It involvessearching the compressed data in its compressed state, as well asdecompressing the data when used.

The process 900 may be implemented in software, firmware, hardware, or acombination of these. The process is illustrated as a set of operationsthat may be implemented as computer-executable instructions that can beexecuted at the server and the client. A dashed line distinguishes theoperations being performed in the two phases by the different computingdevices.

At 902, the process receives an input data string and makes a passthrough, counting each pair of characters. This data string can beessentially any string of alphanumeric characters. In our example, thedata string is a string of primarily text characters that form the EPGdata in the fragmented tables. The data compressor 226 constructs acounts table that contains entries for every possible character pair,and counts the number of occurrences of each pair in the input datastring. When the entire data string has been evaluated, the datacompressor ascertains which character pairs are the most common bycomparing the counts. Those pairs with the highest counts are the mostcommon.

At 904, the data compressor 226 constructs a code table that associatescodes with characters and the most common character pairs found in thedata string. The code table contains a standard code set (e.g., ASCIIcode set) that includes codes for every character in the data string aswell as codes that are normally unused. The data compressor 226 assignsunused codes to the most common character pairs identified in the countstable.

At 906, the data compressor 226 compresses the alphanumeric data stringusing the codes in the code table. The most common character pairs arereplaced with shorter codes to reduce the amount of data. Thissubstitution produces a compressed data string that is significantlysmaller than the original input string.

At 908, to facilitate searching of the compressed data string,identifiers are inserted between substrings to separate the compresseddata string into searchable portions. For instance, in the EPG data, theprocess may place identifiers (e.g., one or more zeros) between programtitles, or actor names, or any other items that a viewer is anticipatedto want to search.

At 910, the server packages the compressed data string and code table ina data file that is delivered to the client. The data file may bedirectly distributed to the client, or via the head end services.

At 912, the client stores the compressed data string and code table inRAM 310, as shown in FIG. 3. This is beneficial for low-resource clientswith limited memory capabilities because more EPG data can be stored atthe client.

At 914, the client is able to search the compressed data string in itscompressed state. In the described implementation, the search engine 324searches the compressed EPG data by compressing at least a portion ofthe search query and then comparing the compressed search query withsubstrings in the compressed data string. The search engine can rapidlyskip from substring to substring by keying on the identifiers thatseparate the substrings.

At 916, the client-side decompressor 320 can decompress all or a portionof the compressed data string using the code table. The decompressor 320passes through the compressed data string, substituting the characterpairs in the code table for the associated codes in the compressedstring to expand the data string back to its original size.

Various operations of the process 900 will now be described in moredetail. For discussion purposes, the detailed example is described inthe context of using the 256-character set of ASCII (American StandardCode for Information Interchange) codes. Each ASCII character isrepresented as an eight-bit byte, which can be represented inhexadecimal as a set of codes ranging from 00 (i.e., 0000 0000) to ff(i.e., 1111 1111). It is noted, however, that other code sets may beused, such as EBCDIC (Extended Binary Coded Decimal Interchange Code),UTF8, 8-bit Unicode, and the like. Table Construction (902 and 904)

FIG. 10 shows one exemplary implementation of the table constructionoperations of 902 and 904 in FIG. 9. The process is described withreference to a diagrammatic illustration depicting a counts table 1100and a character code table 1200.

At 1002, the counts table 1100 and the character code table 1200 areinitialized. An exemplary counts table 1100 is shown in more detail inFIG. 11. It is a 256×256 table. The rows represent the first characterin a character pair of the input data string and the columns representthe second character in the character pair. Thus, the counts table 1100contains entries for every possible character pair combination.

An exemplary character code table 1200 is shown in more detail in FIG.12. It is a 256×2 table, with 256 rows representing the 256 ASCII codesand two columns. Since not all codes are used to represent singlecharacters and other punctuations (e.g., commas, periods, quotations,etc.) in the data string, some normally unused codes are available torepresent the most common character pairs identified in the counts table1100. In the described implementation, the tables 1100 and 1200 areinitialized to all zeros.

At 1004 in FIG. 10, the data compressor 226 makes a first pass throughthe input data string and counts each occurrence of character pairs.With each count of a character pair, a corresponding entry in the countstable 1100 is incremented. Suppose the input data string contains thetextual substring “ . . . the next big thing . . . ”, identified byreference number 1050. As the compressor 226 evaluates this substring1050, it increments the count for the character pairs “th”, “he”, “e_”,“n”, “ne”, and so on (where “_” represents a space).

Notice in FIG. 11 that a count field 1102 associated with the characterpair “th” is incremented to a value “1” as shown. The character “t” isrepresented in ASCII as hexadecimal 74 (decimal 116) and the character“h” is represented in ASCII as hexadecimal 68 (decimal 104). Similarly,a count field 1104 associated with the character pair “he” isincremented to a value “1”. As the data string is traversed, the countvalues are incremented to reflect the number of occurrences ofindividual character pairs.

At 1006, the data compressor determines the N most common characterpairs in the data string. Character pairs are ascertained as being themost common by comparing the counts. Those pairs with the highest countsare the most common. The number N is a variable that can be preset ormade dependent upon how many codes in the code table 1200 are availablefor assignment to character pairs.

At 1008, the data compressor 226 marks the single characters found inthe input data string as used in the code table 1200. When a characteris found in the data string, the value in the right column “R” ischanged to 1 to represent that it is being used. This is represented inFIG. 12 with entries for “t”, “h”, and

At 1010, after all single characters and any punctuation symbols aremarked, unused codes in the code table 1200 are assigned to representthe most common character pairs with the highest counts. As shown inFIG. 12, the left column “L” holds the first character and the rightcolumn “R” holds the second character. Suppose that the character pairs“th” and “t_” are found to be among. the most common character pairs. Anunused entry 8 f (or 143) in code table 1200 is assigned to charactercombination “th” and an unused entry bd (or 189) is assigned tocharacter combination “t_”.

Compression (906 and 908)

FIG. 13 shows one exemplary implementation of the compression operationsof 906 and 908 in FIG. 9. The process is described with reference to adiagrammatic illustration of progressively compressed strings. At 1302,every character pair in the input data string is evaluated. A portion ofour example data string is shown as “ . . . the next big thing. Thestory about . . . ”, and is referenced as number 1350.

At 1304, if a character pair is represented in the code table (i.e., oneof the most common character pairs), the code is substituted for thecharacter pair. In the illustrated example, the character pair “th” istwice replaced with the code value 143, and the character pair “t_” isonce replaced with the code value 189. This produces a compressed datastring, as represented by compressed portion 1352. Each substitutionresults in a 50% reduction as the two bytes of each character pair arereplaced with a one-byte code. It is noted that one or more passes maybe made through the data string to produce the compressed data string.Notice also that the character pair “Th” is different than the characterpair “th” due to the different case of the letter “T” in the former, andhence is not replaced with the code for “th”. Additionally, the singlecharacters in the compressed data string are shown in their characterformat for ease of discussion and illustration, but may be replaced withtheir corresponding codes in the compressed data string.

At 1306, compressed substrings are separated with a unique identifier.In this example, a zero is used to separate adjoining substrings, asrepresented in compressed data string portion 1354. However, identifiersother than zero may be used. This separation facilitates quick searchingof the compressed substrings, even at a low resource client. At 1308, acompressed data string with identifier-separated substrings is output.

Client-Based Searching (914)

FIG. 14 shows one exemplary implementation of the searching operation914 in FIG. 9 that is performed at the client on the compressed data.The process is described with reference to a diagrammatic illustrationof an example search item. At 1402, the client receives a search item.This search query may be generated, for example, when the viewer selectsa program from the EPG user interface. The search item can be onessentially any type of data. In the context of EPG data, the searchitem may be a title, actor name, rating, program genre, schedule time,station, and so forth. An example search item 1450 contains the textstring “the next big thing.”

At 1404, the client compresses the search item using the samecompression process described with reference to FIG. 13. The clientexamines each character pair in the search item and replaces pairsrepresented in the code table with the code. This produces a compressedsearch item 1452.

At 1406, the client indexes to the first or next substring in thecompressed data string stored in memory. The client uses the substringidentifier (e.g., a zero) to rapidly skip from substring to substring.

At 1408, the compressed search item is compared to at least a portion ofeach compressed substring. In this example, the compressed search item1452 is compared with each compressed substring 1354. When no match isfound, the client proceeds to the next substring by skipping ahead tothe next identifier. If a match is found, the client decompressor 320decompresses the substring and any related substrings at 1410 toreproduce the original string 1350.

Client-Based Decompression (916)

FIG. 15 shows one exemplary implementation of the decompressionoperation 916 in FIG. 9 that is performed at the client. The process isdescribed with reference to a diagrammatic illustration of decompressingthe compressed substring 1354. At 1502, the decompressor receives thecompressed string of data, as represented by substring 1354. Thedecompression operation may be performed on the entire data string, orportions thereof.

At 1504, the decompressor 320 makes a pass through the compressed datastring. When the decompressor encounters a code, the decompressor usesthe code to index the code table 1200 and replaces the code in thecompressed string with the associated character pair from the code table1200. This is illustrated by the code 143 referencing the associatedcharacter pair “th” in the code table. When the string portion “143e” isdecompressed, the code 143 is replaced with the character pair “th” tothereby expand the data string back to its original content.

At 1506, the decompressor 320 outputs the decompressed data string, orsubstring, for use by the client. In the context of EPG data, thedecompressed data string can be passed to the EPG 322.

Conclusion

Although the invention has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the invention defined in the appended claims is not necessarilylimited to the specific features or acts described. Rather, the specificfeatures and acts are disclosed as exemplary forms of implementing theclaimed invention.

1. One or more computer readable media comprising computer executableinstructions that, when executed, direct a computing-based device to:compress an alphanumeric data string to form a compressed data string;insert identifiers throughout the compressed data string to formdistinct substrings; fragment the data string into equal-size fragmentsprior to delivery of the data string to a remote client; and search thecompressed data string using the identifiers to index from substring tosubstring.
 2. One or more computer readable media as recited in claim 1,further comprising computer executable instructions that, when executed,direct the computing-based device to compress the alphanumeric datastring by substituting available character codes in a character code setthat are not used to represent individual characters in the data stringfor selected character pairs in the data string.
 3. One or more computerreadable media as recited in claim 1, further comprising computerexecutable instructions that, when executed, direct the computing-baseddevice to: identify frequently occurring character pairs in thealphanumeric data string; construct a code table with first codes thatrepresent individual characters in the alphanumeric data string andsecond codes that can be assigned to represent the frequently occurringcharacter pairs in the alphanumeric data string; and compress thealphanumeric data string by substituting the second codes for thefrequently occurring character pairs.
 4. One or more computer readablemedia as recited in claim 3, further comprising computer executableinstructions that, when executed, direct the computing-based device to:utilize a counts table with counts associated with every possiblecombination of two characters to identify the frequently occurringcharacter pairs; and for each character pair in the alphanumeric datastring, increment a count associated with the character pair in thecounts table.
 5. One or more computer readable media as recited in claim3, further comprising computer executable instructions that, whenexecuted, direct the computing-based device to: mark in the code tableindividual characters found in the alphanumeric data string andassociate the first codes with the individual characters to constructthe code table; and assign any remaining codes as the second codes torepresent the frequently occurring character pairs.
 6. One or morecomputer readable media comprising computer executable instructionsthat, when executed, direct a computing-based device to prepare programdata for delivery to a client that executes an electronic program guide,the computing-based device directed to: initially allocatedifferent-size portions of memory representative of a client memory fordifferent time units represented in the electronic program guide;evaluate whether program data for the different time units fits in therespective different-size portions of the memory; and adjust quantitiesof the program data for the different time units to identify an entireset of program data for storage at the client, wherein differentquantities of the program data are stored for the different time units.7. One or more computer readable media as recited in claim 6, furthercomprising computer executable instructions that, when executed, directthe computing-based device to fragment the program data into equal-sizefragments prior to delivery to the client.
 8. One or more computerreadable media as recited in claim 6, further comprising computerexecutable instructions that, when executed, direct the computing-baseddevice to allocate the different-size portions of the memory for timeunits that comprise 24-hour days.
 9. One or more computer readable mediaas recited in claim 6, further comprising computer executableinstructions that, when executed, direct the computing-based device toallocate more of the memory for time units that are closer in time andless of the memory for time units that are further out in time.
 10. Oneor more computer readable media comprising computer executableinstructions that, when executed, direct a computing-based device to:form a data string of program data for an electronic program guide;compress the data string by identifying frequently occurring characterpairs in the data string and substituting character codes from acharacter code set, which are not used to represent individualcharacters, in place of the frequently occurring character pairs; andfragment the data string into equal-size fragments prior to delivery ofthe data string to a remote client.
 11. One or more computer readablemedia as recited in claim 10, further comprising computer executableinstructions that, when executed, direct the computing-based device to:store the program data in multiple tables, each table comprising one ormore records with one or more fields; and sort the records in the tablesaccording to a selected field type prior to delivery of the program datato the remote client, wherein the records form the data string.
 12. Oneor more computer readable media as recited in claim 11, furthercomprising computer executable instructions that, when executed, directthe computing-based device to store the program data in the multipletables that comprise a particular structure, and rearrange the recordswithout changing the particular structure when sorting the records inthe tables.
 13. One or more computer readable media as recited in claim11, further comprising computer executable instructions that, whenexecuted, direct the computing-based device to select the field typefrom a group of fields including actor names, program genre, title, andratings.
 14. One or more computer readable media as recited in claim 11,further comprising computer executable instructions that, when executed,direct the computing-based device to: store the program data in themultiple tables, each table comprising one or more program recordscontaining programming information, individual program records having atitle field to identify a program name; and arrange the program recordsin the tables according to a stopped name version of the program name inthe title field to sort the records.
 15. One or more computer readablemedia as recited in claim 10, further comprising computer executableinstructions that, when executed, direct the computing-based device to:compress the data string to form a compressed data string; insertidentifiers throughout the compressed data string to form distinctsubstrings; and search the compressed data string using the identifiersto index from substring to substring.